<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>element should not contain relative URL references</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="icon" href="http://www.feedvalidator.org/favicon.ico" />
<link rel="shortcut icon" href="http://www.feedvalidator.org/favicon.ico" />
<style type="text/css" media="screen">@import "../../css/common.css";
@import "../../css/documentation.css";</style>
<script type="text/javascript"><!-- --></script>
<link rel="start" href="http://feedvalidator.org/docs/" title="Home" />
</head>
<body>
<div id="logo">
<h1><a href="../../"><span id="feed"><span id="f">F</span><span id="e1">E</span><span id="e2">E</span></span><span id="d">D</span> Validator</a></h1>
<p>Documentation</p>
<a class="skip" href="#startnavigation">Jump to navigation</a>
</div> <!--logo-->

<div id="main">
<h2>Message</h2>
<div class="docbody">
<p><code>element</code> should not contain relative URL references</p>
</div>
<h2>Explanation</h2>

<div class="docbody">
<p>Some RSS elements are allowed to contain HTML, including links and images.  However, if these links use relative URLs to point to resources, users of some news aggregators will not be able to click on them.  And your images use the relative URLs, the images may not appear (since the news aggregator will be looking for the images locally on the user's hard drive, rather than on your web site).</p>
</div>
<h2>Solution</h2>
<div class="docbody">
<p>Make sure all URLs are absolute, that is, that they include your server name and a full path.</p>

<p>This is an example of a relative URL in a link (bad):</p>

<blockquote>
<p><code>&lt;a href="../../archives/001087.html"&gt;as I discussed yesterday&lt;/a&gt;</code></p>
</blockquote>

<p>This is the same example, using an absolute URL (good):</p>

<blockquote>
<p><code>&lt;a href="http://www.example.com/archives/001087.html"&gt;as I discussed yesterday&lt;/a&gt;</code></p>
</blockquote>

<p>The same thing applies to the <code>src</code> attribute of images.  This is an example of an image that uses a relative URL (bad):</p>

<blockquote>
<p><code>&lt;img src="../../images/catpictures/73.jpg"&gt;</code></p>
</blockquote>

<p>This is the same image, using an absolute URL (good):</p>

<blockquote>
<p><code>&lt;img src="http://www.example.com/images/catpictures/73.jpg"&gt;</code></p>
</blockquote>
</div>
<h2>Not clear?  Disagree?</h2>
<div class="docbody">
<p>You might be able to find help in one of <a href="../howto/resources.html">these fine resources</a>.</p>
</div>

</div><!--main-->
<div class="centered">
<a name="startnavigation" id="startnavigation"></a>
<div class="navbarWrapper">
    <div class="navbarContent">
        <img class="borderTL" src="../../images/borderTL.gif" alt="" width="14" height="14" />
        <img class="borderTR" src="../../images/borderTR.gif" alt="" width="14" height="14" />

<p>
<a href="../../">Home</a> &middot;
<a href="../../about.html">About</a> &middot;
<a href="../../news/">News</a> &middot;
<a href="../../docs/">Docs</a> &middot;
<a href="../../terms.html">Terms</a>
</p>

        <div class="roundedCornerSpacer">&nbsp;</div>
    </div><!-- .content -->
    <div class="bottomCorners">
        <img class="borderBL" src="../../images/borderBL.gif" alt="" width="14" height="14" />
        <img class="borderBR" src="../../images/borderBR.gif" alt="" width="14" height="14" />
    </div><!-- .bottomCorners -->
</div><!-- .contentWrapper -->
</div><!-- .centered -->

<div class="centered">
<address>Copyright &copy; 2002-4 <a href="http://diveintomark.org/">Mark Pilgrim</a> and <a href="http://www.intertwingly.net/blog/">Sam Ruby</a></address>
</div>

</body>
</html>
